Default Objects and Default Properties
QuickDraw GX provides default versions for all types of shape objects, and default values for the properties of other objects such as styles, inks, transforms, color sets,
and color profiles. Therefore, when you create an object with aGXNewObject
call, its properties are already set to match the default. For example, the default rectangle shape object has an owner count of 1, a solid shape fill, corners at locations (0.0, 0.0) and
(0.0, 0.0), and a reference to the default ink object. If you want the new shape to have different dimensions or to reference a different ink object, you can change those properties after creating the shape.The default shape objects are unique among QuickDraw GX default objects in that you can change them. If you want every new shape of a certain type to start off with a particular set of properties, you can change the properties of the default shape for that shape type, and every new shape of that type that you create will have the new properties.
You cannot change the default for most other objects. However, you can effectively change the default for any object that is referenced directly or indirectly by a shape object. For example, you can effectively create a new default ink object by first creating a version of the ink object that has the properties you want, and then altering all default shape objects to reference that ink object instead of the default ink object.
For objects for which there is no changeable default, there are nevertheless default values that are applied to the object when it is first created.
Default color sets and color profiles
- Color sets have changeable default versions, but they function differently than default shapes. You can define a color set to be the default associated with bitmaps of a given pixel depth. However, when you create a color set using the
GXNewColorSet
function, it has specific properties that are unaffected by any previous definitions of defaults.
There is a single default color profile, applied by QuickDraw GX to colors that do not have an attached profile. The default profile is not directly changeable.![]()